1
general::
Frighten or startle someone very much, as in You nearly gave me heart failure when you told me you were quitting. It is Also put as have heart failure, meaning "be frightened or startled," as in I just about had heart failure when I heard about her accident. These hyperbolic terms allude to the life-threatening physical condition in which the heart fails to pump blood at an adequate rate or stops altogether. Also see HEART MISSES A BEAT.
American Heritage Idioms